﻿// <copyright file="SRCategoryAttribute.cs" company="DotNetLib">
//
// .netlib: http://www.codeplex.com/DotNetLib
//
// This code is released under the New BSD License.
// A copy of this license is available at:
// http://www.codeplex.com/DotNetLib/license
//
// </copyright>

namespace DotNetLib.Internal
{
  using System.ComponentModel;
  using DotNetLib.Properties;

  /// <summary>
  /// Provides a localizable way to get designer category names.
  /// </summary>
  internal sealed class SRCategoryAttribute : CategoryAttribute
  {
    public SRCategoryAttribute(string category)
      : base(category)
    {
    }

    protected override string GetLocalizedString(string value)
    {
      return Resources.ResourceManager.GetString(value);
    }
  }
}
